package week12;

import java.io.BufferedReader;
import java.io.FileReader;


public class ReaderTest {
	public static void main(String[] args) throws Exception{
		BufferedReader br = null;
		try{
			FileReader fr = new FileReader("d:/a.txt");
			br = new BufferedReader(fr);
			String line = null;
			while((line=br.readLine())!=null)
				System.out.println(line);
		}finally{
			if(br!=null){
				br.close();
			}
		}
		String encoding = System.getProperty("file.encoding");
        System.out.println("Default System Encoding:" + encoding);
	}

}
